package com.learner.service.impl;

import com.learner.dao.DepartmentDao;
import com.learner.entity.Department;
import com.learner.service.DepartmentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Auther: qho
 * @Date: 2018/10/12 08:40
 * @Description:
 */
@Service("departmentService")
public class DepartmentServiceImpl implements DepartmentService {
    @Resource
    private DepartmentDao departmentDao;

    @Override
    public List<Department> find(Map<String, Object> map) {
        return departmentDao.find(map);
    }

    @Override
    public int count(Map<String, Object> map) {
        return departmentDao.count(map);
    }

    @Override
    public int add(Department department) {
        return departmentDao.add(department);
    }

    @Override
    public int update(Department department) {
        return departmentDao.update(department);
    }

    @Override
    public int delete(Integer id) {
        return departmentDao.delete(id);
    }

    @Override
    public Department loadById(Integer id) {
        return departmentDao.loadById(id);
    }
}
